<?php

class keke_task_class {

	static public function get_task_ly_info($task_id, $comment_type, $limit = 10, $page = 1, $url = null) {
		$page_obj = new keke_page_class ();
		$sql = " select * from " . TABLEPRE . "witkey_comment where obj_id = '$task_id' and comment_type = '$comment_type' and p_id = 0";
		$comment_count = db_factory::execute ( $sql );
		$comment_pages = $page_obj->getPages ( $comment_count, $limit, $page, $url );
		$comment_info = db_factory::query ( $sql . $comment_pages ['where'] );
		$comment_p_info = db_factory::query ( " select * from " . TABLEPRE . "witkey_comment where obj_id = '$task_id' and p_id>0" );
		$result_arr ['pages'] = $comment_pages;
		$result_arr ['work_comment'] = $comment_info;
		$result_arr ['puber_comment'] = $comment_p_info;
		return $result_arr;
	}
}

?>